home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-11 | 527 b | 30 lines | [TEXT/ttxt] |
- ; input number and leave in reg 3
-
- copy:word 0=>reg3
- getloop
- jump:sub input
- compare:char '0'=>reg0
- jump:greater_eq gottall
- compare:char '9'=>reg0
- jump:less_eq gottall
- multiply:word 10=>reg3
- subtract:word '0'=>reg0
- add:word reg0=>reg3
- jump getloop
- gottall
- halt
- input
- copy:byte instatus,Reg0
- jump:equal input
- copy:byte indata=>reg0
- return
- output
- copy:long reg0,savedata
- copy:byte outstatus=>reg0
- jump:not_equal output
- copy:long savedata,Reg0
- copy:byte reg0,outdata
- return
- savedata variable:long 1
- end
-